import request from '@/utils/request'

export function add(data, ids) {
  return request({
    url: 'api/zhsqHome?ids=' + ids,
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/zhsq/',
    method: 'delete',
    data: ids
  })
}

export function edit(data, ids) {
  return request({
    url: 'api/zhsqHome?ids=' + ids,
    method: 'put',
    data
  })
}

export function onlyEdit(data) {
  return request({
    url: 'api/zhsq/onlyEdit',
    method: 'put',
    data
  })
}

export function submitZhsq(data, ids) {
  return request({
    url: 'api/zhsqHome/submitZhsqHome?ids=' + ids,
    method: 'put',
    data
  })
}

export function checkZhsq(data) {
  return request({
    url: 'api/zhsq/checkZhsq',
    method: 'put',
    data
  })
}

export function checkPgPcjgzh(data) {
  return request({
    url: 'api/zhsq/checkPgPcjgzh',
    method: 'put',
    data
  })
}

export function checkJbzxZhsq(data) {
  return request({
    url: 'api/zhsq/checkJbzxZhsq',
    method: 'put',
    data
  })
}

export function zpspZhsq(data) {
  return request({
    url: 'api/zhsq/zpspZhsq',
    method: 'put',
    data
  })
}

export function getApprove() {
  return request({
    url: 'api/zhsq/approve',
    method: 'get'
  })
}

export function getZhid(params) {
  return request({
    url: 'api/zhsq/queryZhid',
    method: 'get',
    params
  })
}

export function getZhHistory(params) {
  return request({
    url: 'api/zhsqHistory',
    method: 'get',
    params
  })
}

export function findZhsqById(params) {
  return request({
    url: 'api/zhsq/findZhsqById',
    method: 'get',
    params
  })
}

export function cancelZhsq(params) {
  return request({
    url: 'api/zhsq/cancelZhsq',
    method: 'delete',
    params
  })
}

export default { add, edit, del, checkZhsq, checkJbzxZhsq, checkPgPcjgzh, submitZhsq, getZhid, zpspZhsq, getZhHistory, findZhsqById, cancelZhsq, onlyEdit }
